﻿using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class support : MonoBehaviour {

    public InputField p1;
    public InputField p2;
    public InputField p3;
    public InputField p4;
    public InputField cards;

	// Use this for initialization
	void Start () {
	
	}

    public void OnClick()
    {
        SendGm(p1.text, p2.text, p3.text, p4.text, cards.text);
    }
    public void SendGm(string p1, string p2, string p3, string p4, string cards)
    {
        var jjobj = new SimpleJson.JsonObject();
        jjobj["p1"] = p1;
        jjobj["p2"] = p2;
        jjobj["p3"] = p3;
        jjobj["p4"] = p4;
        jjobj["card"] = cards;
        if (robot.last != null)
        {
            robot.last.pc.request("connector.userHandler.WriteFile", jjobj, (ret) =>
            {
                Debug.Log("WriteFile" + ret);

            });
        }

    }
    // Update is called once per frame
    void Update () {
	
	}
}
